<%= render 'merchants/common/pagenav' %>
<div id="pageWrapper" class="merchant">
	<div id="pageBody">

		<h1>Create gift card</h1>

		<div class="progressIndicator">

			<ul class="inlineList">
				<li class="on">
					<span>1</span>
					Enter card details
				</li>
				<li>
					<div class="line"></div>
				</li>
				<li>
					<span>2</span>
					Preview
				</li>
				<li>
					<div class="line"></div>
				</li>
				<li>
					<span>3</span>
					Submit
				</li>

			</ul>

		</div>

		<div class="overflow">
			<div class="pageCol1">
				<form accept-charset="UTF-8" action="/products/update_giftcard" class="formWrapper largeElems new_product" id="new_product" method="post" enctype="multipart/form-data">	
					<input type="hidden" name="product_condition_id" id="product_condition_id" value="<%= @product.product_condition.id %>"/>
					<input type="hidden" name="product_id" id="product_id" value="<%= @product.id %>" />
					<div class="input">
						<label>Enter the title for gift card</label>
						<input id="product_product_name" name="product[product_name]" value="<%= @product.product_name %>" size="30" type="text" class="xLarge" />
					</div>

					<div class="inputRow">
						<div class="input">
							<label>Price customer will pay</label>
							<input id="product_price" name="product[price]" value="<%= @product.price %>" size="30" type="text" />
						</div>						
						<div class="input">
							<label>Discount</label>
							<input id="product_discount" name="product[discount]" value="<%= @product.discount %>" size="30" type="text" />
						</div>						
					</div>

					<div class="inputRow">
						<div class="input">
							<label>Number of gift cards to sell</label>
							<input type="text" name="product_condition[available_quantity]" id="product_condition_available_quantity" value="<%= @product.product_condition.available_quantity %>" placeholder="Eg: 100 or 200" />
						</div>

						<div class="input">
							<label>Expiration date</label>
							<input type="text" id="product_condition_exp_date" name="product_condition[exp_date]" value="<%= @product.product_condition.exp_date %>" />
						</div>
					</div>

					<div class="input">
						<label>Enter the description for your gift card</label>
						<textarea cols="40" id="product_product_description" name="product[product_description]"  rows="20" class="xLarge"><%= @product.product_description %></textarea>
					</div>

					<div class="input">
						<label>Enter key terms/conditions for your gift card</label>
						<textarea id="product_key_terms" name="product[key_terms]"  class="xLarge ht40"><%= @product.key_terms %></textarea>
					</div>

					<div class="input">
						<label>Enter full terms/conditions for your gift card</label>
						<textarea id="product_full_terms" name="product[full_terms]" class="xLarge"><%= @product.full_terms %></textarea>
					</div>

					<div class="input">
						<label>Image to be displayed</label>
						<input type="file" name="display_pic" id="display_pic" class="xLarge" />
					</div>

					<div class="buttonBar">
						<button class="btn large" name="commit" type="submit">Preview</button>
					</div>
					
					
					<!-- HIDDEN FIELDS -->
					<input id="product_merchant_product_category_id" name="product[merchant_product_category_id]" size="30" type="hidden" value="1" />
					<input id="product_product_type" type="hidden" name="product[product_type]" size="30" value="1" />

				</form>
			</div>

			<div class="pageCol2">
				<div class="infoMessage tipBox">
					We can show some tips here.
				</div>
			</div>
		</div>
	</div>
</div>